package com.kxz.config;

import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;
import javax.jms.Topic;

@Configuration
public class BeanConfig {
    @Bean
    public Queue query(){   //点对点
        return new ActiveMQQueue("myQueue");
    }
    @Bean
    public Topic topic(){   //发布/订阅式
        return new ActiveMQTopic("myTopic");
    }
}
